package cn.fzkj.gulimall.ware.dao;

import cn.fzkj.gulimall.ware.entity.WareSkuEntity;
import cn.fzkj.gulimall.ware.vo.SkuStockVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 * 
 * @author chenxin
 * @email chenxin@gmail.com
 * @date 2022-02-17 22:59:33
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    void addStock(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum, @Param("wareId") Long wareId);

    /** 查询对应的skuid 是否有库存 */
    List<SkuStockVo> getSkuStock(@Param("skuIds") List<Long> skuIds);
}
